from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from .views import statistical
from .views import users

from rest_framework.routers import SimpleRouter
from .views import specs
from .views import spu
urlpatterns = [
    url('^authorizations/$', obtain_jwt_token),
    url(r'^statistical/total_count/$', statistical.TotalView.as_view()),
    url(r'^statistical/day_increment/$', statistical.UserDayCountView.as_view()),
    url(r'^statistical/day_active/$', statistical.UserActiveCountView.as_view()),
    url(r'^statistical/day_orders/$', statistical.UserOrderCountView.as_view()),
    url(r'^statistical/month_increment/$', statistical.UserMonthCountView.as_view()),
    url(r'^statistical/goods_day_views/$', statistical.GoodsDayView.as_view()),

    url(r'^users/$', users.UserView.as_view()),
    url(r'^goods/simple/$',spu.SpuSimpleView.as_view())

]

router = SimpleRouter()
router.register('goods/specs', specs.SpecViewSet, base_name='specs')
urlpatterns += router.urls
